package com.project.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Entity;
import javax.persistence.Table;


@Data
@Document(indexName = "content_nr")
public class ContentNREntity {
    @Id
    @Field(type = FieldType.Keyword)
    private String contentId;//不添加到非关系性数据库，内容Id，用雪花算法
    @Field(type = FieldType.Text)
    private String content;//内容
    @Field(type = FieldType.Keyword)
    private String title;//标题
    @Field(type = FieldType.Keyword)
    private Integer type;//类型
}
